<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>属性绑定</title>
		
		<style>
			.red{
				background-color: blue;
				color: red;
				font-size: 20px;
			}
		</style>
	</head>
	<body>
		
		<div id="app">
			<h3>v-bind绑定</h3>
			<a href="http://www.baidu.com">百度</a><br />
			<a v-bind:href="url">百度vue</a>
			<!-- 简写 -->
			<a :href="url">百度vue</a>
			
			<hr />
			<div :class="{red:flag}">aaaaaa</div>
			<button @click="flag=!flag">切换</button>
		</div>
		
		<script src="../js/vue.js"></script>
		<script>
			const app=new Vue({
				el:"#app",
				data:{
					url:"http://www.baidu.com",
					flag:true
				},
				methods:{
				
				}
			})
		</script>
	</body>
</html>
